<template>
  <el-dialog title="导入结果" :visible.sync="open" width="60%" :close-on-click-modal="false" append-to-body>
    <div class="msg-clz">{{msg}}</div>
    <el-table v-loading="loading" :data="failedList" size="mini" border :height="400">
      <el-table-column label="分区编号" align="center" prop="areaID" width="120"/>
      <el-table-column label="用户编号" align="center" prop="terminalID" width="100"/>
      <el-table-column label="用户名称" align="center" prop="userName" width="100"/>
      <!-- <el-table-column label="用户地址" align="center" prop="terminalAddress"/> -->
      <!-- <el-table-column label="口径" align="center" prop="caliber"/> -->
      <el-table-column label="表编号" align="center" prop="easIonID" width="100"/>
      <el-table-column label="生产厂家" align="center" prop="supplierID" width="80">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.terminal_supplier" :value="scope.row.supplierID"/>
        </template>
      </el-table-column>
      <el-table-column label="失败原因" align="center" prop="importContent"/>
    </el-table>
  </el-dialog>
</template>

<script>

export default {
  name: "importFailedTable",
  dicts: ['terminal_supplier'],
  props: {
    callback: {
      type: Function,
      default: () => {

      }
    }
  },
  data() {
    return {
      msg:'',
      open: false,
      // 遮罩层
      loading: false,
      // 失败数据
      failedList: [],
    }
  },
  methods: {
    openDialog(data) {
      this.msg = data.msg
      this.open = true
      this.failedList = data.failedXbList;
      this.callback();
    },
  }
}
</script>

<style scoped>
.msg-clz{
  font-size: 16px;
  line-height: 36px;
  width: 100%;
  height: 36px;
  border: 1px solid #EBEEF5;
  border-bottom: none;
  padding-left: 10px;
  color: #333;
}
</style>
